<?php $sku = $product_array->sku; ?>
<body style="overflow: hidden" class="catalog-product-view catalog-product-view product-<?php echo $sku; ?>">
<script type="text/javascript" src="<?php echo base_url('skin/js/gallery.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('skin/js/sortgallery.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('skin/js/specification.js'); ?>"></script>

<div class="fbcont">

	<div class="bannersaktofb"></div>
	
	<div id="phoneGalleryfbnobg">

	<div class="width791c padding20 alignCenter textBlue z5 fontLight">
		<a href="<?php  echo site_url('welcome'); ?>" class="block posabsofb fontBold textBlue textdecounderfb font12fb textdecounderrev">Home</a> 
    </div>

    <div class="wizard marg20topfb margbot15yv">
            <a href="<?php  echo site_url('gallery'); ?>" class="">
            <span class="wiz1"></span>
                 <p class="font15mtop10fb wiz1to4wcustom">Pick a gadget</p>
            </a>
            <a href="<?php  echo site_url('promo'); ?>" class="">
             <span class="wiz2"></span>
                 <p class="font15mtop10fb wiz1to4wcustom">Choose your promo</p>
            </a>
            <a href="<?php  echo site_url('prepaid'); ?>" class="">
             <span class="wiz3"></span>
                 <p class="font15mtop10fb wiz1to4wcustom">Enter your mobile number</p>
            </a>
            <a href="<?php  echo site_url('userprofile'); ?>" class=" ">
             <span class="wiz4"></span>
                 <p class="font15mtop10fb wiz1to4wcustom">Complete your profile</p>
            </a>
            <a href="<?php  echo site_url('globestore'); ?>" class="width100">
             <span class="wiz5"></span>
                 <p class="font15mtop10fb wiz5wcustom">Select your preferred Globe Store branch for handset pickup	</p>
            </a>
     </div>

	<div class="width791c comparesfb5">

		<div class="phoneviewfbcont">
	        <div id="phonefb_photos">
				<div class="phonefb_image">
					<!-- Default image needs to dissapear on thumbnail click -->
					<img id="spec-img" src="<?php echo $product_array->imageurl; ?>" alt="<?php echo $product_array->name; ?>">
				</div>
				<div class="phonefb_thumbs alignCenter">
					<a data-img="<?php echo $product_array->imageurl; ?>" href="<?php echo $product_array->imageurl; ?>" class="selected" rel="product_thumb_group"><img src="<?php echo $product_array->thumbnail; ?>" height="50" width="50" alt=""></a>
				</div>
			</div>
		</div>
      	<div class="phonenamepricefb">
			<p id="phone_Name" class="textLight font40bluefb marg0"><?php echo $product_array->name; ?></p>
			<p id="phone_Price" class="textReg font30fbyv marg0">P2,500.00</p>
			<a href="<?php echo $maitai_get_this_url; ?>" id="getgadget" class="buttonBlue buttshadowaddfb Pricesmallfixdyn margtopyv30 alignCenter margright15yv"><span class="posRel" id="getgadget2">Get this gadget now</span></a>
			<a href="#." id="<?php echo $sku; ?>" class="buttonBlue buttshadowaddfb Pricesmallfixdyn  margtopyv30 alignCenter compare-sku"><span class="posRel">Add to compare</span></a>
        </div>	

		<div class="clear"></div>	
	</div>
	
	<div class="width791c comparesfb3">
        	
		<p class="box-title fluid-width mbottom45">SPECIFICATIONS</p>
		<div class="product-postpaid-box-left pull-left">

			<div class="product-postpaid-spec-box">
                <div class="grey-line margbot30"></div>
				<p class="pp-spec-box-title purple"><span class="icon size"></span> SIZE</p>
				<div class="pp-spec-box-content">
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Dimension:</strong> <?php echo $product_array->Size->Dimension; ?></p>
					<span class="clear"></span>
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Weight:</strong> <?php echo $product_array->Size->Weight; ?> g</p>
					<span class="clear"></span>
				</div>
			</div>

			<div class="product-postpaid-spec-box">
                <div class="grey-line margbot30"></div>
				<p class="pp-spec-box-title red"><span class="icon battery"></span> BATTERY</p>
				<div class="pp-spec-box-content">
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Talk time:</strong> <?php echo $product_array->Battery->Talk_Time; ?></p>
					<span class="clear"></span>
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Stand-by time:</strong> <?php echo $product_array->Battery->Stand_By_Time; ?></p>
					<span class="clear"></span>
				</div>
			</div>
				
			<div class="product-postpaid-spec-box box-last">
                <div class="grey-line margbot30"></div>
				<p class="pp-spec-box-title pink"><span class="icon media"></span> MEDIA</p>
				<div class="pp-spec-box-content">
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Camera:</strong> <?php echo $product_array->Media->Camera; ?></p>
					<span class="clear"></span>
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Secondary Camera:</strong> <?php echo $product_array->Media->Secondary_Camera; ?></p>
					<span class="clear"></span>
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Video/ Video calling/ Radio:</strong> <?php echo str_replace("_" , " / " , $product_array->Media->Video__Video_Calling__Radio); ?></p>
					<span class="clear"></span>
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Loudspeaker/ 3.5mm jack:</strong> <?php echo str_replace("_" , " / " , $product_array->Media->Loudspeaker__35mm_jack); ?></p>
					<span class="clear"></span>
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Flash/ Media player/ Games:</strong> <?php echo str_replace("_" , " / " , $product_array->Media->Flash__Media_Player__Games); ?></p>
					<span class="clear"></span>

					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Alert types:</strong> <?php echo $product_array->Media->Alert_Types; ?></p>
					<span class="clear"></span>

					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Touch screen/ Qwerty:</strong> <?php echo str_replace("_" , " / " , $product_array->Media->Touch_Screen__Qwerty); ?></p>
					<span class="clear"></span>
					
				</div>
			</div>
		</div>

		<div class="product-postpaid-box-right pull-right">
			<div class="product-postpaid-spec-box">
				<div class="grey-line margbot30"></div>
				<p class="pp-spec-box-title green"><span class="icon display"></span> DISPLAY</p>
				<div class="pp-spec-box-content">
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Display:</strong> <?php echo $product_array->Display->Display; ?></p>
					<span class="clear"></span>
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Size:</strong> <?php echo $product_array->Display->Size; ?></p>
					<span class="clear"></span>
					
				</div>
			</div>
			
			<div class="product-postpaid-spec-box">
			<div class="grey-line margbot30"></div>
				<p class="pp-spec-box-title blue"><span class="icon memory"></span> MEMORY</p>
				<div class="pp-spec-box-content">
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Internal:</strong> <?php echo $product_array->Memory->Internal; ?></p>
					<span class="clear"></span>
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Card Slot:</strong> <?php echo $product_array->Memory->Card_Slot; ?></p>
					<span class="clear"></span>
				</div>
			</div>
			
			<div class="product-postpaid-spec-box box-last">
			<div class="grey-line margbot30"></div>
				<p class="pp-spec-box-title grey"><span class="icon features"></span> FEATURES</p>
				<div class="pp-spec-box-content">
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>OS:</strong> <?php echo $product_array->Features->OS; ?></p>
					<span class="clear"></span>
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>CPU:</strong> <?php echo $product_array->Features->CPU; ?></p>
					<span class="clear"></span>
					
					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Java:</strong> <?php echo $product_array->Features->Java; ?></p>
					<span class="clear"></span>

					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Messaging:</strong> <?php echo $product_array->Features->Messaging; ?></p>
					<span class="clear"></span>

					<p><span class="icon check floatLeft"></span></p>
					<p class="floatLeft w255specfb"><strong>Connectivity:</strong>  <?php echo $product_array->Features->Connectivity; ?></p>
					<span class="clear"></span>
				</div>
			</div>
		</div>
               
	<div class="clear"></div>                   
	</div>	


	<?php if ($has_reco): ?>  
	<div class="width791c comparesfb4">
        <div class="youmightalsofb">
    
		<div class="center">
			<p style="color:#000" class="fluid-width marg0topfb fontReg alignCenter">
				<a id="b-you-might" href="#" onclick="javascript: return false;" style="color: #1853A3;">You Might Also Like</a>
				<span id="sep" style="color: white; ">&nbsp;&nbsp;|&nbsp;&nbsp;</span>	
				<a id="b-recently-viewed" href="#" onclick="javascript: return false;" style="color: rgb(0, 0, 0); ">Recently Viewed</a>
			</p>

			<div class="online-gallery" style="visibility: visible; overflow: hidden; position: relative; z-index: 2; left: 0px; width: 678px; height: 220px;">
			   <div id="b-you-might">
				
				<script type="text/javascript">
				transaction_id = "<?php echo $reco_transaction_id; ?>";
				_session = "<?php echo $this->session->userdata('session_id'); ?>";
				</script>


				<ul class="products-grid" style="margin: 0px; padding: 0px; position: relative; list-style-type: none; z-index: 1; width: 678px; left: 0px;">


					<?php foreach ($reco_items as $reco_item): ?>
						<?php
							if(!$reco_item) continue;	// SKIP KUNG EMPTY ARRAY
						
							$reco_item_sku = $reco_item->sku;
							$reco_item_name = $reco_item->name;
							$reco_item_url = base_url() . "index.php/specification/" . $reco_item_sku;
						?>					
						
						<li class="item" style="width: 186px; overflow: visible; float: left;">
						<a href="<?php echo base_url() . "index.php/specification/" . $reco_item_sku; ?>" onclick="_paq.push(['setCustomVariable', 3, _session , 'Recommended Items , <?php echo $reco_item_sku; ?> , maitai product-page', 'page']); _paq.push(['setCustomVariable', 5, 'transaction_id', transaction_id, 'page']); _paq.push(['setCustomVariable', 1, _session, window.location.href,'page']); _paq.push(['trackLink']);" title="<?php echo $reco_item_name; ?>" class="product-image">
							<img src="<?php echo $reco_item->imageurl; ?>" width="135" height="135" alt="<?php echo $reco_item_name; ?>">
						</a>
						
						<h3 class="product-name">
							<a href="$reco_item_url" onclick="_paq.push(['setCustomVariable', 3, _session , 'Recommended Items , <?php echo $reco_item_sku; ?> , maitai product-page', 'page']); _paq.push(['setCustomVariable', 5, 'transaction_id', transaction_id, 'page']); _paq.push(['setCustomVariable', 1, _session, window.location.href,'page']); _paq.push(['trackLink']);" title="<?php echo $reco_item_name; ?>">
								<?php echo $reco_item_name; ?>
							</a>
							<script type="text/javascript">
							jQuery(document).ready(function() {
							   jQuery('#<?php echo "galleryadd-" . $reco_item_sku; ?>').click(function(){

								 var sku = "<?php echo $reco_item_sku; ?>";
								 var maitainumbercompare = getCookie("fb_maitainumbercompare");

								 if(maitainumbercompare=="" || maitainumbercompare=="0") {
									document.cookie="fb_maitainumbercompare=" + "1" + "; path=/";
									document.cookie="fb_maitaicompare1=" + sku + "; path=/";
								 }

								 if(maitainumbercompare=="1") {
									document.cookie="fb_maitainumbercompare=" + "2" + "; path=/";
									document.cookie="fb_maitaicompare2=" + sku + "; path=/";
								 }
								 
								 if(maitainumbercompare=="2") 
									alert("The comparison list is full.");	     
									window.location="<?php echo base_url(); ?>index.php/compare";
								  
							   });
							});
							</script>
						</h3>
						
						<h3 class="product-like"><?php echo $reco_item->like; ?> likes</h3>		        
						                
						<div class="customer-ctrl">
					        <!-- <a href="#" class="add-to-compare" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $reco_item_sku; ?> , maitai product-page , Recommended Items', 'page']); _paq.push(['setCustomVariable', 5, 'transaction_id', transaction_id, 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a> -->
						<?php if(!isset($_COOKIE['fb_maitainumbercompare']) || $_COOKIE['fb_maitainumbercompare']=="0"): ?>
						<a class="add-to-compare" id="<?php echo "galleryadd-" . $reco_item_sku; ?>" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $sku; ?> , maitai gallery-page , bestsellers', 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a>
						<a class="remove-to-compare" id="<?php echo "galleryremove-" . $reco_item_sku; ?>" style="display:none;"><span>Remove from Comparison</span></a>
						<?php endif;?>

						<?php if(isset($_COOKIE['fb_maitainumbercompare']) && $_COOKIE['fb_maitainumbercompare']=="1"): ?>
						  <?php //var_dump($reco_item);?>
						  <?php if($_COOKIE['fb_maitaicompare1']==$reco_item_sku): ?>
						     <a class="add-to-compare" id="<?php echo "galleryadd-" . $reco_item_sku; ?>" style="display:none;" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $sku; ?> , maitai gallery-page , bestsellers', 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a>
						     <a class="remove-to-compare" id="<?php echo "galleryremove-" . $sku; ?>"><span>Remove from Comparison</span></a>
						  <?php else: ?>
						     <a class="add-to-compare" id="<?php echo "galleryadd-" . $reco_item_sku; ?>" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $sku; ?> , maitai gallery-page , bestsellers', 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a>
						     <a class="remove-to-compare" id="<?php echo "galleryremove-" . $sku; ?>" style="display:none;"><span>Remove from Comparison</span></a>
						  <?php endif;?>
						<?php endif;?>

						<?php if(isset($_COOKIE['fb_maitainumbercompare']) && $_COOKIE['fb_maitainumbercompare']=="2"): ?>
						  <?php if($_COOKIE['fb_maitaicompare1']==$reco_item_sku || $_COOKIE['fb_maitaicompare2']==$reco_item_sku): ?>
						     <a class="add-to-compare" id="<?php echo "galleryadd-" . $reco_item_sku; ?>" style="display:none;" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $sku; ?> , maitai gallery-page , bestsellers', 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a>
						     <a class="remove-to-compare" id="<?php echo "galleryremove-" . $reco_item_sku; ?>"><span>Remove from Comparison</span></a>
						  <?php else: ?>
						     <a class="add-to-compare" id="<?php echo "galleryadd-" . $reco_item_sku; ?>" onclick="javascript:_paq.push(['setCustomVariable', 3, _session, 'Add to Compare , <?php echo $sku; ?> , maitai gallery-page , bestsellers', 'page']); _paq.push(['setCustomVariable', 1, _session , window.location.href,'page']); _paq.push(['trackLink']);"><span>Add to Compare</span></a>
						     <a class="remove-to-compare" id="<?php echo "galleryremove-" . $reco_item_sku; ?>" style="display:none;"><span>Remove from Comparison</span></a>
						  <?php endif;?>
						<?php endif;?>


						<script type="text/javascript">
						jQuery(document).ready(function() {
						   jQuery('#<?php echo "galleryremove-" . $reco_item_sku; ?>').click(function(){

							 var sku = "<?php echo $reco_item_sku; ?>";
							 var maitaicompare1 = getCookie("fb_maitaicompare1");
							 var maitaicompare2 = getCookie("fb_maitaicompare2");
							 var maitainumbercompare = getCookie("fb_maitainumbercompare");

							 if(maitainumbercompare=="1") {
							   document.cookie="fb_maitainumbercompare=" + "0" + "; path=/";
							   
							   if(sku==maitaicompare1){
								document.cookie="fb_maitaicompare1=" + "" + "; path=/";
								document.cookie="fb_maitaicompare2=" + "" + "; path=/";
								window.location=location.href;
							   } 

							 }
							
							 if(maitainumbercompare=="2") {
							   document.cookie="fb_maitainumbercompare=" + "1" + "; path=/";
							   
							   if(sku==maitaicompare1){
								 document.cookie="fb_maitaicompare1=" + maitaicompare2 + "; path=/";
								 document.cookie="fb_maitaicompare2=" + "" + "; path=/";
							   } 

							   if(sku==maitaicompare2)
								document.cookie="fb_maitaicompare2=" + "" + "; path=/";	     
									window.location=location.href;
							 } 
					 
						   });
						});
						</script>

						</div>
						            
						</li>
            						
					<?php endforeach; ?>
				
                        </ul>
            				<p class="gallery-nav box-title gale-nav" style="display:none"></p>	
		          </div>
			   <div id="b-recently-viewed" style="display:none">
			   	<ul class="products-grid" style="width: 928px !important; margin: 0px; padding: 0px; position: relative; list-style-type: none; z-index: 1; left: 0px;"></ul>
								
			    <p class="gallery-nav box-title gale-nav" style="display:none"></p>
				<script type="text/javascript">
					jQuery('a#a-recently-viewed').hide();
					jQuery('a#b-recently-viewed').hide();
					jQuery('span#sep').hide();
				</script>
				</div>
		    </div>
		</div>
    
    
        </div>
	</div>
	<?php endif; ?>
	
</div>
</div>